﻿@using OPM
@using OPM.MultiResource;
@model OPM.Models.GetCase

<div id="servicePage3" class="servicePage dNone">
    <table>
        <tr>
            <td>@Multi.contact</td>
            <td>
                <input type="hidden" name="name-id" id="customer-id" value="" />
                <input type="text" name="name-id" id="customer" value="" />
                <a href="@Url.Action("LovSearchCustomer", "Complaint")?a=customer" data-block="customer" class="callBoxCustomer">
                    <div class="search-person"></div>
                </a>

                <input type="hidden" name="cust_is_public" id="cust_is_public" value="" />
                <input type="hidden" name="cust_type" id="cust_type" value="" />
                <input type="hidden" name="cust_country_id" id="cust_country_id" value="" />
                <input type="hidden" name="cust_gender_id" id="cust_gender_id" value="" />
                <input type="hidden" name="cust_title" id="cust_title" value="" />
                 <input type="hidden" name="cust_firstname" id="cust_firstname" value="" />
                <input type="hidden" name="cust_lastname" id="cust_lastname" value="" />
                <input type="hidden" name="cust_citizen_id" id="cust_citizen_id" value="" />
                <input type="hidden" name="cust_address" id="cust_address" value="" />
                <input type="hidden" name="cust_province_id" id="cust_province_id" value="" />
                <input type="hidden" name="cust_district_id" id="cust_district_id" value="" />
                <input type="hidden" name="cust_subdistrict_id" id="cust_subdistrict_id" value="" />
                <input type="hidden" name="cust_number" id="cust_number" value="" />
                <input type="hidden" name="cust_is_defective" id="cust_is_defective" value="" />
                <input type="hidden" name="cust_postcode" id="cust_postcode" value="" />
                <input type="hidden" name="cust_remark" id="cust_remark" value="" />
                <input type="hidden" name="cust_birthday" id="cust_birthday" value="" />
                <input type="hidden" name="cust_contact_detail" id="cust_contact_detail" value="" />

            </td>
        </tr>
        <tr>
            <td>@Multi.assignCustomer</td>
            <td>
                <input type="checkbox" name="hidden-name-input" id="hidden-name-input" value="" />
               @* <input type="radio" name="hidden-name-input" id="hidden-name-input" value="1" /></td>*@
        </tr>
        <tr>
            <td>@Multi.is_secret</td>
            <td>
                <select name="secret-level" id="secret-level">
                    <option value="0">เปิดเผย</option>
                    <option value="1">ปกปิด</option>
                    <option value="2">ลับ</option>
                    <option value="3">ลับสุดยอด</option>
                </select>
            </td>
        </tr>
    </table>
    <div class="boxBlank"></div>
    <div>
        <div class="BoxServiceActionPrev floatL" onclick="nextpage3();">@Multi.BackPage</div>
        <div class="BoxServiceActionNext floatR" onclick="nextStep(4);">@Multi.NextPage</div>
        <div class="clear"></div>
    </div>
</div>

<script>
    $(document).ready(function () {
        $(".callBoxCustomer").colorbox({
                iframe: true,
                width: "650px",
                fastIframe: false,
                height: "80%"
            });
    });

    function CustomertDataReturn(name, id) {
        $.colorbox.close();
        console.log(name+" "+id);
        $('#customer').val(name);
        $('#customer-id').val(id);
    }

    $("#hidden-name-input").on('change', function (e) {
        var contacNoName = $('#contactHidden').is(':checked');

        if (contacNoName == true) {

            $("#customer").prop('disabled', true);
            $("#secret-level").prop('disabled', true);
        }
        else {
            $("#customer").prop('disabled', false);
            $("#secret-level").prop('disabled', false);
        }

    });

</script>
    
